home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / May 90 / MacApp.Tech$ 5⁄18⁄90 / 1307-MacApp 2.0 control b-May90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  776 b   |  25 lines  |  [TEXT/GEOL]

  1. Item    4134798                         17-May-90        21:49PDT
  2.  
  3. From:   D2215                           DacEasy, Wilma Blair,PRT
  4.  
  5. To:     MACDTS                          Macintosh Developer Tech Supt
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. Sub:    MacApp 2.0 control bug
  9.  
  10. In MacApp 2.0, a control that is not shown may still end up handling a
  11. HandleMouseDown event if it is enabled.  This is not the case with
  12. TView.ContainsMouse which specifically checks for IsShown.  Here is the bug fix
  13. for TControl.ContainsMouse.
  14.  
  15. FUNCTION TControl.ContainsMouse(theMouse: VPoint): BOOLEAN; OVERRIDE;
  16. VAR
  17.    aRect:  Rect;
  18. BEGIN
  19.      ControlArea(aRect);
  20.      ContainsMouse := { my change } IsShown & PtInRect(VPtToPt(theMouse), aRect
  21. END;
  22.  
  23. Regards, Les Caudle
  24.  
  25.